//
//  CYMessageModel.m
//  CreditAddressBook
//
//  Created by Mosu&Cuu on 15/12/23.
//  Copyright © 2015年 Lee. All rights reserved.
//

#import "CYMessageModel.h"

@implementation CYMessageModel

-(instancetype)initWithDictionary:(NSDictionary *)dic{
    self = [super init];
    if(nil == self){
        return nil;
    }
    
    NSString *str = [dic objectForKey:@"insertTime"];
    NSDate *date = [NSDate dateWithTimeIntervalSince1970:str.longLongValue/1000];
    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init];
    [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
    self.insertTime = [dateFormatter stringFromDate:date];
    
    self.pushMsg = [dic objectForKey:@"pushMsg"];
    self.title = [dic objectForKey:@"title"];
    return self;
}

@end
